Creates a CorrectResponse object, which may then be used to be added to the Interaction.CorrectResponses list.
Parent Type: LearningDataModel
Namespace: Microsoft.LearningComponents.DataModel
Assembly: Microsoft.LearningComponents.dll
| C# |
|
public CorrectResponse CreateCorrectResponse () |
A new CorrectResponse object associated with this LearningDataModel.
| Exception type | Condition |
| InvalidOperationException | Thrown if this LearningDataModel object cannot be written to. |
The following example demonstrates creating a new correct response and adding it to the Interaction.CorrectResponses collection.
| C# |
LearningSession session = ... ; // get LearningSession object CorrectResponse c = session.CurrentActivityDataModel.CreateCorrectResponse(); c.Pattern = "true"; session.CurrentActivityDataModel.Interactions[0].CorrectResponses.Add(c); |